package com.controller;

import com.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: sksun2
 * @create: 2023-07-24
 */
@RequestMapping("order")
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping("create")
    public String createOrder(@RequestParam("userId") String userId, @RequestParam("itemId")String itemId,@RequestParam("num") Integer num){
        orderService.createOrder(userId,itemId,num);
        return "ok";
    }
}
